package edu.cqnu.se.yangyuan.gps_trajectorytracker.menu;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.amap.api.maps.MapView;

import edu.cqnu.se.yangyuan.gps_trajectorytracker.R;
import edu.cqnu.se.yangyuan.gps_trajectorytracker.playback.PlayBackActivity;
import edu.cqnu.se.yangyuan.gps_trajectorytracker.playback.RecordListActivity;
import edu.cqnu.se.yangyuan.gps_trajectorytracker.record.RecordActivity;

/**
 * 菜单，主要在几个页面（功能）之间切换
 * Created by yangyuan on 2017/4/23.
 */

public class MenuActivity extends Activity {
    private Button menuRecord;
    private Button menuPlayBack;
    private Button menuUpload;
    private Button menuDownload;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_menu);
        menuRecord = (Button)findViewById(R.id.menuRecord);
        menuPlayBack = (Button)findViewById(R.id.menuPlayBack);
        menuUpload = (Button)findViewById(R.id.menuUpload);
        menuDownload = (Button)findViewById(R.id.menuDownload);
        menuRecord.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MenuActivity.this,RecordActivity.class);
                startActivity(intent);
            }
        });
        menuPlayBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MenuActivity.this,RecordListActivity.class);
                startActivity(intent);
            }
        });


    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
        //在activity执行onDestroy时执行……
    }
    @Override
    protected void onResume() {
        super.onResume();
        //在activity执行onResume时执行……
    }
    @Override
    protected void onPause() {
        super.onPause();
        //在activity执行onPause时执行……
    }
    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        //在activity执行onSaveInstanceState时执行……
    }

}
